-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/wakaama: add DTLS support #16233
pkg/wakaama: add DTLS support #16233
Conversation
c150779
to
5c0e1b7
Compare
Rebased, now that #16179 is merged |
Successfully tested this using the Below is a screenshot of the LwM2M server dashboard showing the device and DTLS connection info. Additionally the console output for the lwm2m client:
|
5c0e1b7
to
5e4b2f1
Compare
So far testing has not gone that well. Further investigation is needed before we can proceed. It is crashing on both the |
Some documentation additions I will just throw here as well: Running with securityIn the security section click 'Add Security Information', select the security mode Then Assuming The final field, the
Bootstrap server (optional) |
Looks like something changed in the meantime, and the stack size of the event thread was not big enough now. I updated this in the example Makefile now. Tested with the feather-nrf52840-sense board. |
I just tested with a master rebase, aside from documentation updates I think this looks good, I would also like to try on the samr21-xpro maybe... |
oi oi oi, also some native64 fixes are needed I guess |
Let's see if the prints are fixed now |
Looks like I finally got it right |
Can you squash and just update the args? |
36e5b53
to
c4dd829
Compare
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, tested the pre-squash and it worked. Looking at the code (quite a bit) looks OK too.
c4dd829
to
17a3125
Compare
Updated Makefile.ci |
Thanks for the review! Nice to see this merged 😃 |
Contribution description
This PR adds support for DTLS connections when using LwM2M. The LwM2M client implementation has been rewritten to allow both CoAP and CoAP over DTLS to be used at the same time. An own implementation of the Security Object is introduced, as it needs to handle the interaction with the Credential Manager (credman).
For now only Pre-Shared Key mode is supported.Pre-Shared Key and Raw Public Key modes are supported. DTLS is supported during the communication with LwM2M server and during bootstrapping.Update: Raw public key mode is added now as well.
The example application has been modified to use DTLS connections by default. Finally, documentation has been improved.
Testing procedure
The best way to test this is using the
example/wakaama
application. If you use Eclipse Leshan as your LwM2M Server implementation, you should see an indication that the connection is done over DTLS:The example can be modified to use plain CoAP connection to the server. That should also work as usual.
Issues/PRs references
Depends on #16179(merged)Depends on #16203(merged)Depends on #16709(merged)